package cn.tonystack.domain.res;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * @description：TODO
 * @author： tony.pan
 * @create： 2024/10/10 21:34
 */
public class ResponseData {

    @JsonProperty("status")
    private int status;

    @JsonProperty("message")
    private String message;

    @JsonProperty("request_id")
    private String requestId;

    @JsonProperty("result")
    private Result result;

    // Getters and Setters

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Result getResult() {
        return result;
    }

    public void setResult(Result result) {
        this.result = result;
    }

    public static class Result {

        @JsonProperty("location")
        private Location location;

        @JsonProperty("address")
        private String address;

        @JsonProperty("address_component")
        private AddressComponent addressComponent;

        @JsonProperty("ad_info")
        private AdInfo adInfo;

        @JsonProperty("address_reference")
        private AddressReference addressReference;

        @JsonProperty("formatted_addresses")
        private FormattedAddresses formattedAddresses;

        // Getters and Setters

        public Location getLocation() {
            return location;
        }

        public void setLocation(Location location) {
            this.location = location;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public AddressComponent getAddressComponent() {
            return addressComponent;
        }

        public void setAddressComponent(AddressComponent addressComponent) {
            this.addressComponent = addressComponent;
        }

        public AdInfo getAdInfo() {
            return adInfo;
        }

        public void setAdInfo(AdInfo adInfo) {
            this.adInfo = adInfo;
        }

        public AddressReference getAddressReference() {
            return addressReference;
        }

        public void setAddressReference(AddressReference addressReference) {
            this.addressReference = addressReference;
        }

        public FormattedAddresses getFormattedAddresses() {
            return formattedAddresses;
        }

        public void setFormattedAddresses(FormattedAddresses formattedAddresses) {
            this.formattedAddresses = formattedAddresses;
        }
    }

    public static class Location {

        @JsonProperty("lat")
        private double lat;

        @JsonProperty("lng")
        private double lng;

        // Getters and Setters

        public double getLat() {
            return lat;
        }

        public void setLat(double lat) {
            this.lat = lat;
        }

        public double getLng() {
            return lng;
        }

        public void setLng(double lng) {
            this.lng = lng;
        }
    }

    public static class AddressComponent {

        @JsonProperty("nation")
        private String nation;

        @JsonProperty("province")
        private String province;

        @JsonProperty("city")
        private String city;

        @JsonProperty("district")
        private String district;

        @JsonProperty("street")
        private String street;

        @JsonProperty("street_number")
        private String streetNumber;

        // Getters and Setters

        public String getNation() {
            return nation;
        }

        public void setNation(String nation) {
            this.nation = nation;
        }

        public String getProvince() {
            return province;
        }

        public void setProvince(String province) {
            this.province = province;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getDistrict() {
            return district;
        }

        public void setDistrict(String district) {
            this.district = district;
        }

        public String getStreet() {
            return street;
        }

        public void setStreet(String street) {
            this.street = street;
        }

        public String getStreetNumber() {
            return streetNumber;
        }

        public void setStreetNumber(String streetNumber) {
            this.streetNumber = streetNumber;
        }
    }

    public static class AdInfo {

        @JsonProperty("nation_code")
        private String nationCode;

        @JsonProperty("adcode")
        private String adcode;

        @JsonProperty("phone_area_code")
        private String phoneAreaCode;

        @JsonProperty("city_code")
        private String cityCode;

        @JsonProperty("name")
        private String name;

        @JsonProperty("location")
        private Location location;

        @JsonProperty("nation")
        private String nation;

        @JsonProperty("province")
        private String province;

        @JsonProperty("city")
        private String city;

        @JsonProperty("district")
        private String district;

        @JsonProperty("_distance")
        private int distance;

        // Getters and Setters

        public String getNationCode() {
            return nationCode;
        }

        public void setNationCode(String nationCode) {
            this.nationCode = nationCode;
        }

        public String getAdcode() {
            return adcode;
        }

        public void setAdcode(String adcode) {
            this.adcode = adcode;
        }

        public String getPhoneAreaCode() {
            return phoneAreaCode;
        }

        public void setPhoneAreaCode(String phoneAreaCode) {
            this.phoneAreaCode = phoneAreaCode;
        }

        public String getCityCode() {
            return cityCode;
        }

        public void setCityCode(String cityCode) {
            this.cityCode = cityCode;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Location getLocation() {
            return location;
        }

        public void setLocation(Location location) {
            this.location = location;
        }

        public String getNation() {
            return nation;
        }

        public void setNation(String nation) {
            this.nation = nation;
        }

        public String getProvince() {
            return province;
        }

        public void setProvince(String province) {
            this.province = province;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getDistrict() {
            return district;
        }

        public void setDistrict(String district) {
            this.district = district;
        }

        public int getDistance() {
            return distance;
        }

        public void setDistance(int distance) {
            this.distance = distance;
        }
    }

    public static class AddressReference {

        @JsonProperty("town")
        private Town town;

        @JsonProperty("landmark_l2")
        private LandmarkL2 landmarkL2;

        @JsonProperty("street")
        private Street street;

        @JsonProperty("street_number")
        private StreetNumber streetNumber;

        @JsonProperty("crossroad")
        private Crossroad crossroad;

        // Getters and Setters

        public Town getTown() {
            return town;
        }

        public void setTown(Town town) {
            this.town = town;
        }

        public LandmarkL2 getLandmarkL2() {
            return landmarkL2;
        }

        public void setLandmarkL2(LandmarkL2 landmarkL2) {
            this.landmarkL2 = landmarkL2;
        }

        public Street getStreet() {
            return street;
        }

        public void setStreet(Street street) {
            this.street = street;
        }

        public StreetNumber getStreetNumber() {
            return streetNumber;
        }

        public void setStreetNumber(StreetNumber streetNumber) {
            this.streetNumber = streetNumber;
        }

        public Crossroad getCrossroad() {
            return crossroad;
        }

        public void setCrossroad(Crossroad crossroad) {
            this.crossroad = crossroad;
        }
    }

    public static class Town {

        @JsonProperty("id")
        private String id;

        @JsonProperty("title")
        private String title;

        @JsonProperty("location")
        private Location location;

        @JsonProperty("_distance")
        private double distance;

        @JsonProperty("_dir_desc")
        private String dirDesc;

        // Getters and Setters

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public Location getLocation() {
            return location;
        }

        public void setLocation(Location location) {
            this.location = location;
        }

        public double getDistance() {
            return distance;
        }

        public void setDistance(double distance) {
            this.distance = distance;
        }

        public String getDirDesc() {
            return dirDesc;
        }

        public void setDirDesc(String dirDesc) {
            this.dirDesc = dirDesc;
        }
    }

    public static class LandmarkL2 {

        @JsonProperty("id")
        private String id;

        @JsonProperty("title")
        private String title;

        @JsonProperty("location")
        private Location location;

        @JsonProperty("_distance")
        private double distance;

        @JsonProperty("_dir_desc")
        private String dirDesc;

        // Getters and Setters

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public Location getLocation() {
            return location;
        }

        public void setLocation(Location location) {
            this.location = location;
        }

        public double getDistance() {
            return distance;
        }

        public void setDistance(double distance) {
            this.distance = distance;
        }

        public String getDirDesc() {
            return dirDesc;
        }

        public void setDirDesc(String dirDesc) {
            this.dirDesc = dirDesc;
        }
    }

    public static class Street {

        @JsonProperty("id")
        private String id;

        @JsonProperty("title")
        private String title;

        @JsonProperty("location")
        private Location location;

        @JsonProperty("_distance")
        private double distance;

        @JsonProperty("_dir_desc")
        private String dirDesc;

        // Getters and Setters

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public Location getLocation() {
            return location;
        }

        public void setLocation(Location location) {
            this.location = location;
        }

        public double getDistance() {
            return distance;
        }

        public void setDistance(double distance) {
            this.distance = distance;
        }

        public String getDirDesc() {
            return dirDesc;
        }

        public void setDirDesc(String dirDesc) {
            this.dirDesc = dirDesc;
        }
    }

    public static class StreetNumber {

        @JsonProperty("id")
        private String id;

        @JsonProperty("title")
        private String title;

        @JsonProperty("location")
        private Location location;

        @JsonProperty("_distance")
        private double distance;

        @JsonProperty("_dir_desc")
        private String dirDesc;

        // Getters and Setters

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public Location getLocation() {
            return location;
        }

        public void setLocation(Location location) {
            this.location = location;
        }

        public double getDistance() {
            return distance;
        }

        public void setDistance(double distance) {
            this.distance = distance;
        }

        public String getDirDesc() {
            return dirDesc;
        }

        public void setDirDesc(String dirDesc) {
            this.dirDesc = dirDesc;
        }
    }

    public static class Crossroad {

        @JsonProperty("id")
        private String id;

        @JsonProperty("title")
        private String title;

        @JsonProperty("location")
        private Location location;

        @JsonProperty("_distance")
        private double distance;

        @JsonProperty("_dir_desc")
        private String dirDesc;

        // Getters and Setters

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public Location getLocation() {
            return location;
        }

        public void setLocation(Location location) {
            this.location = location;
        }

        public double getDistance() {
            return distance;
        }

        public void setDistance(double distance) {
            this.distance = distance;
        }

        public String getDirDesc() {
            return dirDesc;
        }

        public void setDirDesc(String dirDesc) {
            this.dirDesc = dirDesc;
        }
    }

    public static class FormattedAddresses {

        @JsonProperty("recommend")
        private String recommend;

        @JsonProperty("rough")
        private String rough;

        @JsonProperty("standard_address")
        private String standardAddress;

        // Getters and Setters

        public String getRecommend() {
            return recommend;
        }

        public void setRecommend(String recommend) {
            this.recommend = recommend;
        }

        public String getRough() {
            return rough;
        }

        public void setRough(String rough) {
            this.rough = rough;
        }

        public String getStandardAddress() {
            return standardAddress;
        }

        public void setStandardAddress(String standardAddress) {
            this.standardAddress = standardAddress;
        }
    }
}